<html>
    <head>
        <title>子功能</title>
    </head>
    <body>
        <script>
            /*
                
                                4、子功能  Child Features

                                        一个功能可能有子功能。如果你想创建一个仅在另一个功能可选择的功能，这将特别有用。

                                        eg: 定义子功能

                                            using FeaturesDemo.Localization;
                                            using Volo.Abp.Features;
                                            using Volo.Abp.Localization;
                                            using Volo.Abp.Validation.StringValues;

                                            namespace FeaturesDemo
                                            {
                                                public class MyFeatureDefinitionProvider : FeatureDefinitionProvider
                                                {
                                                    public override void Define(IFeatureDefinitionContext context)
                                                    {
                                                        var myGroup = context.AddGroup("MyApp");

                                                        var reportingFeature = myGroup.AddFeature(
                                                            "MyApp.Reporting",
                                                            defaultValue: "false",
                                                            displayName: LocalizableString
                                                                            .Create<FeaturesDemoResource>("Reporting"),
                                                            valueType: new ToggleStringValueType()
                                                        );

                                                        reportingFeature.CreateChild(  // 添加子功能
                                                            "MyApp.PdfReporting",
                                                            defaultValue: "false",
                                                            displayName: LocalizableString  // 界面展示名称
                                                                            .Create<FeaturesDemoResource>("PdfReporting"),
                                                            valueType: new ToggleStringValueType()
                                                        );

                                                        reportingFeature.CreateChild(  // 添加子功能
                                                            "MyApp.ExcelReporting",
                                                            defaultValue: "false",
                                                            displayName: LocalizableString
                                                                            .Create<FeaturesDemoResource>("ExcelReporting"),
                                                            valueType: new ToggleStringValueType()
                                                        );
                                                    }
                                                }
                                            }

                                    上面的示例定义了带有两个子项的Report功能： PDF Report 和 Excel Report
            */
        </script>
    </body>
</html>